<template>
    <div :id="id"></div>
  </template>
<script>
  import E from "wangeditor";
  export default{
    data(){
        return{

        }
    },
    props:{
        content:String,
        id:String
    },
    methods:{

    },
    mounted(){
        let that = this;
        let id = '#'+this.id
        console.log(22,id)
		    console.log(23,this.content)
        const editor = new E(id);
        editor.create();
        editor.txt.html(this.content)
        editor.config.onchange = function(newHtml){
            console.log(newHtml)
            that.$emit('event',newHtml)
        }
    }

  }

  
 
 
  </script>